# encoding=utf-8

from functools import reduce
def calc_prod(lst):
    def lazy_prod():
        def f(x,y):
            return x * y
        return reduce(f,lst,1)
    return lazy_prod
z = calc_prod([1, 2, 3, 4])
print(z())


def calc_prod1(lst):
    def f(x,y):
        return x * y
    return reduce(f,lst,1)
z1 = calc_prod1([1, 2, 3, 4])
print(z1)
